import http from '../service'

export const doLogin = (data = {}) => {
    return http.post({
        url: '/user/server/login',
        data
    })
}
export const doRegister = (data = {}) => {
    return http.post({
        url: '/user/server/register',
        data
    })
}

export const getGameHomeList = (data = {}) => {
    return http.get({
        url: '/server/game/home',
        params: { ...data }
    })
}

export const getGameList = (data = {}) => {
    return http.get({
        url: '/server/game/list',
        params: { ...data }
    })
}

export const getGameDetail = (data = {}) => {
    return http.get({
        url: '/server/game/detail',
        params: { ...data }
    })
}

export const addGame = (data = {}) => {
    return http.get({
        url: '/server/userGame/add',
        params: { ...data }
    })
}

export const getUserGameList = (data = {}) => {
    return http.get({
        url: '/server/userGame/list',
        params: { ...data }
    })
}

export const getCaptchaImage = (data = {}) => {
    return http.get({
        url: '/user/captcha/digit',
        params: { ...data }
    })
}

export const alipay = (data = {}) => {
    return http.post({
        url: '/server/userGame/alipay',
        data
    })
}